package com.sui.bigdata.flink.sql.sink.message.table;

import com.sui.bigdata.flink.sql.core.table.TargetTableInfo;
import org.apache.flink.calcite.shaded.com.google.common.base.Preconditions;

/**
 * @author YongChen
 * @date 2020/3/3 10:46
 * @description
 * @email yong_chen@sui.com
 */
public class MessageSinkTableInfo extends TargetTableInfo {

    private static final String CURR_TYPE = "message";

    public static final String PHONE = "phone";

    public static final String TEMPLATE = "template";

    private String phone;

    private String template;

    public MessageSinkTableInfo() {
        super.setType(CURR_TYPE);
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getTemplate() {
        return template;
    }

    public void setTemplate(String template) {
        this.template = template;
    }

    @Override
    public boolean check() {
        Preconditions.checkNotNull(phone, "message phone is required");
        Preconditions.checkNotNull(template, "message template is required");
        return false;
    }

    @Override
    public String getType() {
        return super.getType();
    }
}
